package com.campusexpresspickup.service.impl;

import com.campusexpresspickup.entity.LogisticsCourier;
import com.campusexpresspickup.mapper.LogisticsCourierMapper;
import com.campusexpresspickup.service.ILogisticsCourierService;
import com.campusexpresspickup.page.LogisticsCourierPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 物流快递员表 服务实现类
 * </p>
 *
 * @author lq
 * @since 2021-11-22
 */
@Service
public class LogisticsCourierServiceImpl extends
    ServiceImpl<LogisticsCourierMapper, LogisticsCourier> implements ILogisticsCourierService {

  private final LogisticsCourierMapper logisticsCourierMapper;

  public LogisticsCourierServiceImpl(
      LogisticsCourierMapper logisticsCourierMapper) {
    this.logisticsCourierMapper = logisticsCourierMapper;
  }

  @Override
  public List<LogisticsCourier> getLogisticsCourierList(LogisticsCourierPage logisticsCourierPage) {
    return logisticsCourierMapper.findCourierList(logisticsCourierPage);
  }

  @Override
  public void updateOrderCountById(Integer courierId, Integer orderCount,Integer orderId) {
    logisticsCourierMapper.updateCourierCount(courierId,orderCount,orderId);
  }
}
